<include file="Public:header2"/>

<div class="main">
    <div class="box_m">

        <include file="Public:main_left2"/>
        <php>
            if($_SESSION['user_group']==1){
        </php>
            <div class="main_r">

                <div class="main_r_t">
                    管理员信息
                </div>
                <div class="main_r_c">
                    <div class="form_ul">
                        <div class="form_li">
                            <div class="form_li_l">用户名：</div>
                            <div class="form_li_r">{$_SESSION.username}</div>
                            <div class="clear"></div>
                        </div>

                    </div>
                </div>

            </div>
        <php>
            }else{
        </php>
            <div class="main_r">

                <div class="main_r_t">
                    修改信息
                </div>
                <div class="main_r_c">
                    <div class="form_ul">
                        <div class="form_li">
                            <div class="form_li_l">用户名：</div>
                            <div class="form_li_r">{$_SESSION.username}</div>
                            <div class="clear"></div>
                        </div>
                        <form action="{:U('Index/doalter')}" method="post" onsubmit="return doalter();">
                            <div class="form_li">
                                <div class="form_li_l">姓名：</div>
                                <div class="form_li_r">
                                    <input type="text" class="input_text" id="name" name="name" value="{$per_center_user_info.name}" />
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="form_li">
                                <div class="form_li_l">性别：</div>
                                <div class="form_li_r">
                                    <input type="radio" value="1" class="input_radio" name="sex" checked> 男
                                    <input type="radio" value="2" class="input_radio" name="sex" <eq name="per_center_user_info.sex" value="2">checked</eq> />女
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="form_li">
                                <div class="form_li_l">年龄：</div>
                                <div class="form_li_r">
                                    <input type="number" class="input_text" min="1" id="age" name="age" value="{$per_center_user_info.age}" />
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="form_li">
                                <div class="form_li_l">地址：</div>
                                <div class="form_li_r">
                                    <input type="text" class="input_text" id="address" name="address" value="{$per_center_user_info.address}" />
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="form_li">
                                <div class="form_li_l">Email：</div>
                                <div class="form_li_r">
                                    <input type="text" class="input_text" id="email" name="email" value="{$per_center_user_info.email}" />
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="form_li">
                                <div class="form_li_l">&nbsp;</div>
                                <div class="form_li_r">
                                    <button class="form_btn">保存</button>
                                </div>
                                <div class="clear"></div>
                            </div>
                        </form>
                    </div>
                </div>

            </div>
        <php>
            }
        </php>

        <div class="clear"></div>
    </div>
</div>
<script type="text/javascript">
    function doalter() {
        var name = $("#name").val();
        var age = $("#age").val();
        var address = $("#address").val();
        var email = $("#email").val();
        if (name == "") {
            alert("请输入姓名！");
            return false;
        }
        if (age == "") {
            alert("请输入年龄！");
            return false;
        }
        if (address == "") {
            alert("请输入地址！");
            return false;
        }
        if (email == "") {
            alert("请输入email！");
            return false;
        }
    }

</script>

<include file="Public:bottom"/>